// 注册数据
const map = {
    center: "() => import('../views/authPage/center.vue')",
    Layout: "() => import('../views/authPage/Layout.vue')",
    project_list: "() => import('../views/authPage/project_list.vue')",
    require_list: "() => import('../views/authPage/require_list.vue')",
    task_list: "() => import('../views/authPage/center.vue')"
  }
//服务端数据
let  asyncRoutes = [
    {
      path: '/main',
      component: 'Layout',
      redirect: 'noRedirect',
      name: 'main',
      meta: {
        title: '白泽',
        icon: 'component'
      },
      children: [
        {
          path: 'project_list',
          // component: () => import('@/baize/manager/project_list'),
          component: 'project_list',
          name: 'project_list',
          meta: { title: '项目管理', icon: 'icon', noCache: true }
        },
        {
          path: 'require_list',
          // component: () => import('@/baize/manager/require_list'),
          component: 'require_list',
          name: 'require_list',
          meta: { title: '需求管理', icon: 'icon', noCache: true }
        },
        {
          path: 'task_list',
          // component: () => import('@/baize/manager/task_list'),
          component: 'task_list',
          name: 'task_list',
          meta: { title: '任务管理', icon: 'icon', noCache: true }
        }
      ]
    },
  
    // 404 page must be placed at the end !!!
    { path: '*', redirect: '/404', hidden: true }
  ]
  setComMap()
function setComMap() {
    asyncRoutes.forEach(ele => {
      ele.component = map[element.component]
  
    });
  }